-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DM-35115: Add bulge_flux_fraction column to source injection schema #691
base: main
Are you sure you want to change the base?
Conversation
0daad62
to
6824dca
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quick comment about log message conventions: (1) f-strings should not be used in debug log messages (I didn't comment on every place) (2) some of your logs are missing the %s
.
@@ -79,7 +79,7 @@ def _add_fake_sources(exposure, objects, calibFluxRadius=12.0, logger=None): | |||
posd = galsim.PositionD(pt.x, pt.y) | |||
posi = galsim.PositionI(pt.x//1, pt.y//1) | |||
if logger: | |||
logger.debug(f"Adding fake source at {pt}") | |||
logger.debug(f"Adding fake source {gsObj} at {pt}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know there is some debate over f-strings in warning and info level messages but for debug we should be using deferred stringifcation so that the final string is only formed if the debug message is going to be issued.
@@ -747,6 +762,8 @@ def add_to_replace_dict(new_name, depr_name, std_name): | |||
cfg.sourceSelectionColName, | |||
'select' | |||
) | |||
if replace_dict: | |||
self.log.debug("Replacing columns:", replace_dict) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be:
self.log.debug("Replacing columns: %s", replace_dict)
copy=False | ||
) | ||
if replace_dict: | ||
self.log.debug("Replacing columns:", replace_dict) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above. The log message should include the %s
.
10c1631
to
de7439f
Compare
No description provided.